<?php session_start(); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Edit Information</title>
<script type="text/javascript" src="validateInformation.js" ></script>
<?php


require_once 'UpdateManager.php';
if(isset($_POST['Done']))
{
	$snum = $_SESSION['snum'];
	$fname=$_POST['firstName'];
	$lname=$_POST['lastName'];
	$mname=$_POST['middleName'];
	$bday=$_POST['bdDate'].$_POST['bdMonth'].$_POST['bdYear'];
	$gender=$_POST['gender'];
	$course=$_POST['course'];
	$status=$_POST['civilStatus'];
	$lschool=$_POST['lastSchoolAttended'];
	$type=$_POST['hSchool'];
	$religion=$_POST['religion'];
	$class=$_POST['classification'];
	$stfap=$_POST['stfapBracket'];
	$schol=$_POST['scholarships'];
	$stipe=$_POST['allowance'];
	$cp=$_POST['cellPhone'];
	$email=$_POST['email'];
	$hobbies=$_POST['hobbies'];
	$honors=$_POST['honors'];
	$talents=$_POST['talents'];
	$ailments=$_POST['ailments'];
	$meds=$_POST['medications'];
	$address=$_POST['homeAddress'];
	$college=$_POST['college'];
	
	$fathername=$_POST['fatherName'];
	$fjob=$_POST['fatherOccupation'];
	$foffice=$_POST['fofficeadd'];
	$fincome=$_POST['fatherIncome'];
	$flife=$_POST['fatherLive'];
	$femployer=$_POST['fatherEmployer'];
	$ftelnum=$_POST['fatherMobile'];
	$mothername=$_POST['motherName'];
	$mjob=$_POST['motherOccupation'];
	$moffice=$_POST['mofficeadd'];
	$mincome=$_POST['motherIncome'];
	$mlife=$_POST['motherLive'];
	$memployer=$_POST['motherEmployer'];
	$mtelnum=$_POST['motherMobile'];
	
	$region=$_POST['region'];
	$parentStatus=$_POST['parentStat'];
	$numbro=$_POST['numBros'];
	$numsis=$_POST['numSis'];
	$order=$_POST['border'];
	
	$gname=$_POST['guardianName'];
	$gadd=$_POST['guardianAddress'];
	$gnum=$_POST['guardianMobile'];
	
	
	$f = UpdateManager::updateResident($snum,$lname,$fname,$mname,$gender,$status,$bday,$course,$religion,$address,$lschool,$type,$class,$stfap,$schol,$stipe,$cp,$email,$hobbies,$honors,$talents,$ailments,$meds,$fathername,$fjob,$foffice,$fincome,$flife,$femployer,$ftelnum,$mothername,$mjob,$moffice,$mincome,$mlife,$memployer,$mtelnum,$region,$parentStatus,$numbro,$numsis,$order,$gname,$gadd,$gnum,$college);
	if($f){
		UpdateManager::showMessage($f);
	}else{
		UpdateManager::showMessage(0);
	}
	
}

?>





<link href="style.css" rel="stylesheet" type="text/css" >
</head>

<body>

<table width="100%" border="0" cellpadding="1">
 
  <tr>
    <td>&nbsp;</td>
    <td class="subBanner"><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edit Resident's Basic Information Form</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    <form id="form1" name="form1" method="post" action="" onsubmit="return validateInformation(this)">
      <table width="100%" border="0" cellpadding="1">
        <!-- form1: Basic Student Information-->
        <tr>
          <td width="37%"><strong>Last Name</strong></td>
          <td width="34%"><input name="lastName" type="text" id="lastName" size="40" value = "<?php echo $_SESSION['namelast']?>"/>            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width="29%" id="lname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>First Name</td>
          <td><input name="firstName" type="text" id="firstName" size="40" value = "<?php echo $_SESSION['namefirst']?>"/>            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="fname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Middle Name</td>
          <td><input name="middleName" type="text" id="firstName2" size="40" value = "<?php echo $_SESSION['namemiddle']?>"/>            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="mname" class="error">&nbsp;</td>
        </tr>
<tr>
          <td>Sex</td>
          <td>
		  <input type="radio" name="gender" value="male" <?php if($_SESSION['gender']=="MALE")echo "checked='checked'";?> ></input>
Male
		  <input type="radio" name="gender" value="female" <?php if($_SESSION['gender']=="FEMALE")echo "checked='checked'"?>></input>

Female&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="gnder" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Civil Status</td>
          <td><input type="radio" name="civilStatus" id="civilStatus" value="single" <?php if($_SESSION['civilstatus']=="SINGLE")echo "checked='checked'"?> ></input>
            <label for="civilStatus"></label>
Single
<input type="radio" name="civilStatus" id="civilStatus2" value="married" <?php if($_SESSION['civilstatus']=="MARRIED")echo "checked='checked'"?> ></input>
Married
<input type="radio" name="civilStatus" id="civilStatus3" value="widowed" <?php if($_SESSION['civilstatus']=="WIDOWED")echo "checked='checked'"?> ></input>
Widowed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="cvilStatus" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Date of Birth</td>
		 <?php
			$dd=substr($_SESSION['birthdate'],0,2);			
			$mm=substr($_SESSION['birthdate'],2,3);
			$yy=substr($_SESSION['birthdate'],5,4);
		  ?>
          <td><select name="bdMonth" id="bdMonth">
			  <option value="JAN" <?php if($mm=='JAN')echo "selected='selected'"?>>January</option>
              <option value="FEB" <?php if($mm=='FEB')echo "selected='selected'"?>>February</option>
              <option value="MAR" <?php if($mm=='MAR')echo "selected='selected'"?>>March</option>
              <option value="APR" <?php if($mm=='APR')echo "selected='selected'"?>>April</option>
              <option value="MAY" <?php if($mm=='MAY')echo "selected='selected'"?>>May</option>
              <option value="JUN" <?php if($mm=='JUN')echo "selected='selected'"?>>June</option>
              <option value="JUL" <?php if($mm=='JUL')echo "selected='selected'"?>>July</option>
              <option value="AUG" <?php if($mm=='AUG')echo "selected='selected'"?>>August</option>
              <option value="SEP" <?php if($mm=='SEP')echo "selected='selected'"?>>September</option>
              <option value="OCT" <?php if($mm=='OCT')echo "selected='selected'"?>>October</option>
              <option value="NOV" <?php if($mm=='NOV')echo "selected='selected'"?>>November</option>
              <option value="DEC" <?php if($mm=='DEC')echo "selected='selected'"?>>December</option>
          </select>
&nbsp;
<label for="bdDay"></label>
<label for="bdDate"></label>
<input name="bdDate" type="text" id="bdDate" size="3" value="<?php echo $dd;?>"/>
&nbsp;
<label for="bdYear"></label>
<select name="bdYear" id="bdYear">

<?php
$ys=1985;
$ye=2011;
for(;$ys <= $ye; $ys++)
{
	echo "<option value='1985'"; if($yy==$ys)echo "selected='selected'"; echo ">" . $ys . "</option>";
}
?>

</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="bday" class="error">&nbsp;</td>
        </tr>
		<tr>
          <td>College</td>
          <td><select name="college" id="college" onchange="setOptions(document.form1.college.options[document.form1.college.selectedIndex].value, 1);">
								<option value="">Select College</option>
								<option value="Agriculture" name="CA">Agriculture</option>
								<option value="Arts and Sciences" name="CAS">Arts and Sciences</option>
								<option value="Economics and Management" name="CEM">Economics and Management</option>
                                <option value="Engineering and Agro Industrial Technology" name="CEAT">Engineering and Agro Industrial Technology</option>			
								<option value="Development Communication" name="CDC">Development Communication</option>
								<option value="Human Ecology" name="CHE">Human Ecology</option>
								<option value="Forestry and Natural Resources" name="CFNR">Forestry and Natural Resources</option>
								<option value="Veterinary Medicine" name="CVM">Veterinary Medicine</option>
								
							</select>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="curse2" class="error">&nbsp;</td>
        </tr>
        
        <tr>
          <td>Course</td>
          <td><select name="course" id="course">
				<option value="">Select Course</option>
          </select>	
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="curse" class="error">&nbsp;</td>
        </tr>
 <tr>
          <td>Religion</td>
          <td><input name="religion" type="text" id="religion" size="40" value = "<?php echo $_SESSION['religion']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="rligion" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Home Address</td>
          <td><input name="homeAddress" type="text" id="homeAddress" size="40" value = "<?php echo $_SESSION['homeaddress']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="hmeAddress" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Last School Attended</td>
          <td><input name="lastSchoolAttended" type="text" id="lastSchoolAttended" size="40" value = "<?php echo $_SESSION['lastschool']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="lstSchoolAttended" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Last School Type</td>
          <td><input type="radio" name="hSchool" id="hSchool2" value="public" <?php if($_SESSION['lastschooltype']=="PUBLIC")echo "checked='checked'"?> ></input>
Public
  <input type="radio" name="hSchool" id="hSchool2" value="private" <?php if($_SESSION['lastschooltype']=="PRIVATE")echo "checked='checked'"?> ></input>
Private
            &nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="htype" class="error" >&nbsp;</td>
        </tr>
        <tr>
          <td>Classification</td>
          <td><input name="classification" type="text" id="classification" size="40" value = "<?php echo $_SESSION['classification']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="clssification" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>STFAP Bracket</td>
          <td><strong>&nbsp;</strong>
            <input type="radio" name="stfapBracket" value="a" <?php if($_SESSION['stfapbracket']=="A")echo "checked='checked'"?> ></input>
A
<label for="stfapBracket"></label>
<input type="radio" name="stfapBracket" id="stfapBracket2" value="b" <?php if($_SESSION['stfapbracket']=="B")echo "checked='checked'"?> ></input>
B
<input type="radio" name="stfapBracket" id="stfapBracket3" value="c" <?php if($_SESSION['stfapbracket']=="C")echo "checked='checked'"?> ></input>
C
<input type="radio" name="stfapBracket" id="stfapBracket4" value="d" <?php if($_SESSION['stfapbracket']=="D")echo "checked='checked'"?> ></input>
D
<input type="radio" name="stfapBracket" id="stfapBracket5" value="e1" <?php if($_SESSION['stfapbracket']=="E1")echo "checked='checked'"?> ></input>
E1
<input type="radio" name="stfapBracket" id="stfapBracket6" value="e2" <?php if($_SESSION['stfapbracket']=="E2")echo "checked='checked'"?> ></input>
E2
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
          <td id="stfap" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Scholarships</td>
          <td><input name="scholarships" type="text" id="scholarships" size="40" value = "<?php echo $_SESSION['scholarships']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="schlarships" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Allowance</td>
          <td><input name="allowance" type="text" id="allowance" size="40" value = "<?php echo $_SESSION['allowance']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="allwance" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Mobile Number</td>
          <td><input name="cellPhone" type="text" id="cellPhone" size="40" value = "<?php echo $_SESSION['cellno']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="cp" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>E-mail Address</td>
          <td><input name="email" type="text" id="email" size="40" value = "<?php echo $_SESSION['email']?>"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="emailadd" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Hobbies</td>
          <td><strong>
            <input name="hobbies" type="text" id="fatherOccupation" size="40" value = "<?php echo $_SESSION['hobbies']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td >&nbsp;</td>
        </tr>
        <tr>
          <td>Honors</td>
          <td><strong>
            <input name="honors" type="text" id="fatherIncome" size="40" value = "<?php echo $_SESSION['honors']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Talents</td>
          <td><strong>
            <input name="talents" type="text" id="fatherEmployer" size="040" value = "<?php echo $_SESSION['talents']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Ailments</td>
          <td><strong>
            <input name="ailments" type="text" id="ailments" size="040" value = "<?php echo $_SESSION['ailments']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="ilments" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Medications</td>
          <td><strong>
            <input name="medications" type="text" id="medications" size="40" value = "<?php echo $_SESSION['medications']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="meds" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>

		<!--form2: Family-->
  
  
  
  <tr>
          <td width="37%"><strong>Father's Name</strong></td>
          <td width="34%"><strong>
            <input name="fatherName" type="text" id="fatherName" size="40" value = "<?php echo $_SESSION['fathername']?>"/>
          </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width="29%" id="ftherName" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="radio" name="fatherLive" id="fatherLive" value="living" <?php if($_SESSION['flife']=="LIVING")echo "checked='checked'"?> />
Living
  <input type="radio" name="fatherLive" id="fatherLive2" value="deceased" <?php if($_SESSION['flife']=="DECEASED")echo "checked='checked'"?> />
Deceased&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="flive" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Father's Occupation</td>
          <td><strong>
            <input name="fatherOccupation" type="text" id="fatherOccupation2" size="40" value="<?php echo $_SESSION['fjob']?>"/>
          </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="fname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td> Office Address</td>
          <td><input name="fofficeadd" type="text" id="firstName2" size="40" value="<?php echo $_SESSION['foffice']?>"/>            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="mname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td> Income</td>
          <td><strong>
            <input name="fatherIncome" type="text" id="fatherIncome2" size="40" value="<?php echo $_SESSION['fincome']?>" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong>
          <td id="fincome" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td> Employer</td>
          <td><strong>
            <input name="fatherEmployer" type="text" id="fatherEmployer2" size="40" value="<?php echo $_SESSION['femployer']?>" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="cstatus" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Mobile Number</td>
          <td><strong>
            <input name="fatherMobile" type="text" id="fatherEmployer3" size="40" value="<?php echo $_SESSION['ftelnum']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="fcp" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td id="religion2" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td width="37%"><strong>Mother's Name</strong></td>
          <td width="34%"><strong>
            <input name="motherName" type="text" id="motherName" size="40" value="<?php echo $_SESSION['mothername']?>"/>
          </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="mtherName" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="radio" name="motherLive" value="living" <?php if($_SESSION['mlife']=="LIVING")echo "checked='checked'"?>/>
            Living
            <input type="radio" name="motherLive" value="deceased" <?php if($_SESSION['mlife']=="DECEASED")echo "checked='checked'"?>/>
            Deceased&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="mlive" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Mother's Occupation</td>
          <td><strong>
            <input name="motherOccupation" type="text" size="40" value="<?php echo $_SESSION['mjob']?>" />
          </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td> Office Address</td>
          <td><input name="mofficeadd" type="text" id="firstName2" size="40" value="<?php echo $_SESSION['moffice']?>" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td> Income</td>
          <td><strong>
            <input name="motherIncome" type="text" id="fatherIncome2" size="40" value="<?php echo $_SESSION['mincome']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            </strong>
          </td>
          <td id="mincome" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td> Employer</td>
          <td><strong>
            <input name="motherEmployer" type="text" id="fatherEmployer2" size="40" value="<?php echo $_SESSION['memployer']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Mobile Number</td>
          <td><strong>
            <input name="motherMobile" type="text" id="fatherEmployer3" size="40" value="<?php echo $_SESSION['mtelnum']?>"/>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="mcp" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
		
		<!-- form 3 -->
		<?php
			//$mm=substr($_SESSION['birthdate'],2,3);
			$region=$_SESSION['region'];
		?>
		<tr>
          <td width="37%"><strong>Region</strong></td>
          <td width="34%"><select name="region" id="region">
            <option value="1" <?php if($region=='1')echo "selected='selected'"?>>Region 1</option>
            <option value="2" <?php if($region=='2')echo "selected='selected'"?>>Region 2</option>
            <option value="3"<?php if($region=='3')echo "selected='selected'"?>>Region 3</option>
            <option value="4A" <?php if($region=='4a')echo "selected='selected'"?>">Region 4A</option>
            <option value="4B" <?php if($region=='4b')echo "selected='selected'"?>>Region 4B</option>
            <option value="5" <?php if($region=='5')echo "selected='selected'"?>>Region 5</option>
            <option value="6" <?php if($region=='6')echo "selected='selected'"?>>Region 6</option>
            <option value="7" <?php if($region=='7')echo "selected='selected'"?>>Region 7</option>
            <option value="8" <?php if($region=='8')echo "selected='selected'"?>>Region 8</option>
            <option value="9"<?php if($region=='9')echo "selected='selected'"?>>Region 9</option>
            <option value="10" <?php if($region=='10')echo "selected='selected'"?>>Region 10</option>
            <option value="11" <?php if($region=='11')echo "selected='selected'"?>>Region 11</option>
            <option value="12" <?php if($region=='12')echo "selected='selected'"?>>Region 12 </option>
            <option value="NCR" <?php if($region=='NCR')echo "selected='selected'"?>>NCR</option>
            <option value="CAR" <?php if($region=='CAR')echo "selected='selected'"?>>CAR</option>
            <option value="CARAGA" <?php if($region=='CARAGA')echo "selected='selected'"?>>CARAGA</option>
            <option value="ARMM" <?php if($region=='ARMM')echo "selected='selected'"?>>ARMM</option>
          </select>            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width="29%" id="lname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Parents are</td>
          <td><input type="radio" name="parentStat" id="parentStat" value="married" <?php if($_SESSION['marriagestat']=='MARRIED')echo "checked='checked'"?> />
Married
  <input type="radio" name="parentStat" id="parentStat2" value="separated" <?php if($_SESSION['marriagestat']=='SEPARATED')echo "checked='checked'"?>/>
Separated&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="stats" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="radio" name="parentStat" id="parentStat3" value="remarried" <?php if($_SESSION['marriagestat']=='REMARRIED')echo "checked='checked'"?>/>
Remarried&nbsp;
<input type="radio" name="parentStat" id="parentStat4" value="single" <?php if($_SESSION['marriagestat']=='SINGLE')echo "checked='checked'"?> />
Single-Parent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Number of Brothers</td>
          <td><strong>
            <input name="numBros" type="text" id="fatherOccupation2" size="3" value="<?php echo $_SESSION['brothers']?>"/>
          </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="nb" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td> Number of Sisters</td>
          <td><input name="numSis" type="text" id="firstName2" size="3" value="<?php echo $_SESSION['sisters']?>"/>
            <strong> </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="ns" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td> Birth Order</td>
          <td><strong>
            <input name="border" type="text" size="3" value="<?php echo $_SESSION['order']?>"/>
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
          <td id="bo" class="error">&nbsp;</td>
        </tr>
		
		<!--Form 4 -->
		
	
        <tr>
          <td width="37%"><strong>Guardian's Name</strong></td>
          <td width="34%"><strong>
            <input name="guardianName" type="text" id="guardianName" size="40" value="<?php echo $_SESSION['name']?>" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td width="29%" id="gname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Address</td>
          <td><strong>
            <input name="guardianAddress" type="text" id="fatherOccupation" size="40" value="<?php echo $_SESSION['address']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="gaddress" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Contact Number</td>
          <td><strong>
            <input name="guardianMobile" type="text" id="fatherIncome" size="40" value="<?php echo $_SESSION['telno']?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            </strong></td>
          <td id="gcp" class="error">&nbsp;</td>
        </tr>
        <!-- RESERVATION-->
		
		
		
		
		
		
		 <tr>
          <td>&nbsp;</td>
          <td><input type="reset" name="rset" id="rset" value="Reset" /></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" name="Done" id="Done" value="Done" /></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td></td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </form></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>